package main

import (
	"fmt"
	"strings"
)

func main() {
	// output: 123
	// TrimRight removes all the trailing runes contained in a given set
	fmt.Println(strings.TrimRight("123oxo", "xo"))

	// output: 123o
	// TrimSuffix returns a string without a provided trailing suffix
	fmt.Println(strings.TrimSuffix("123xo", "xo"))

	// output: 123
	// TrimLeft like TrimRight
	fmt.Println(strings.TrimLeft("oxo123", "ox"))

	// output: o123
	// TrimPrefix like TrimSuffix
	fmt.Println(strings.TrimPrefix("oxo123", "ox"))

	// output: 123
	fmt.Println(strings.Trim("oxo123oxo", "ox"))
}
